package com.lg.service.impl;

import com.lg.mapper.PersonMapper;
import com.lg.pojo.Person;
import com.lg.service.PersonService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class PersonServiceImpl implements PersonService {

    @Autowired
    private PersonMapper personMapper;

    @Override
    public boolean createNewPerson(Person person) {
        return personMapper.createNewPerson(person);
    }

    @Override
    public Person selectPersonByName(String name) {
        return personMapper.selectPersonByName(name);
    }

    @Override
    public boolean updatePerson(Person person) {
        return personMapper.updatePerson(person);
    }

    @Override
    public boolean deletePerson(Long id) {
        return personMapper.deletePerson(id);
    }
}
